package org.fengdi.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.fengdi.account.entity.Account;

@Mapper
public interface AccountMapper extends BaseMapper<Account> {
    @Update("UPDATE `account` SET money=#{money} WHERE user_id = #{userId}")
    void updateMoneyByUserId(Account account); // 更新钱数

    @Select("SELECT * From account where user_id = #{userid}")
    Account getAccountByUserId(String userid);
}
